﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ReservaServices.Dominio;
using System.ServiceModel.Web;

namespace ReservaServices
{   
    [ServiceContract]
    public interface IReservaService
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Reservas", ResponseFormat = WebMessageFormat.Json)]
        String CrearReserva(Reserva reservaACrear);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Reservas/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        Reserva ObtenerReserva(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Reservas", ResponseFormat = WebMessageFormat.Json)]
        List<Reserva> ListarReservas();

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Reservas/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        String CancelarReserva(string codigo);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Reservas", ResponseFormat = WebMessageFormat.Json)]
        String RecibirMensajes();
    }
}
